#include "dynamicnumtext.h"
#include <QDoubleValidator>
#include <QLineEdit>

namespace PublicGui
{
	DynamicNumText::DynamicNumText(const QString& mtext)
	{
		initializationUi();
		setText(0,mtext);
		_tag = "";
	}

	DynamicNumText::~DynamicNumText()
	{}

	void DynamicNumText::initializationUi()
	{
		_editL = new QLineEdit();
		connect(_editL,SIGNAL(textEdited(const QString&)),this,SLOT(slotValueChanged(const QString&)));
		QDoubleValidator* validator = new QDoubleValidator(this);
		_editL->setValidator(validator);
		_editL->setMaximumHeight (25);
		_editL->setMaximumWidth (50);
		_editL->home(true);
		_itemChild.insert(this,_editL);
	}
}